﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="DataSetDatabaseFragmentation" targetNamespace="http://tempuri.org/DataSetDatabaseFragmentation.xsd" xmlns:mstns="http://tempuri.org/DataSetDatabaseFragmentation.xsd" xmlns="http://tempuri.org/DataSetDatabaseFragmentation.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection ConnectionStringObject="Data Source=.;Initial Catalog=SQLServerOptimizer;Integrated Security=True" IsAppSettingsProperty="false" Modifier="Assembly" Name="sereena-pc\sereenasql2008.SQLServerHealthCheckDeploy.dbo" ParameterPrefix="@" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="TableAdapterDatabaseFragmentation" GeneratorDataComponentClassName="TableAdapterDatabaseFragmentation" Name="Top10PercentIndexesPerDatabase" UserDataComponentName="TableAdapterDatabaseFragmentation">
            <MainSource>
              <DbSource ConnectionRef="sereena-pc\sereenasql2008.SQLServerHealthCheckDeploy.dbo" DbObjectName="SQLServerOptimizer.dbo.Top10PercentIndexesPerDatabase" DbObjectType="View" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        Server, InstanceName, DatabaseName, TableName, IndexName, IndexType, IndexSize, IndexSeeks, IndexScans, Statistics_LastUpdatedDate, Fragmentation
FROM            Top10PercentIndexesPerDatabase AS TTPI
WHERE        (ServiceID = @ServiceID) AND (@DatabaseID = - 1) OR
                         (ServiceID = @ServiceID) AND (DatabaseID = @DatabaseID) OR
                         (@DatabaseID = - 1) AND (@ServiceID = - 1) OR
                         (DatabaseID = @DatabaseID) AND (@ServiceID = - 1)
ORDER BY DatabaseName, IndexSize DESC</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="ServiceID" ColumnName="ServiceID" DataSourceName="SQLServerOptimizer.dbo.Top10PercentIndexesPerDatabase" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ServiceID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ServiceID" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="DatabaseID" ColumnName="DatabaseID" DataSourceName="SQLServerOptimizer.dbo.Top10PercentIndexesPerDatabase" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@DatabaseID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="DatabaseID" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Server" DataSetColumn="Server" />
              <Mapping SourceColumn="InstanceName" DataSetColumn="InstanceName" />
              <Mapping SourceColumn="DatabaseName" DataSetColumn="DatabaseName" />
              <Mapping SourceColumn="TableName" DataSetColumn="TableName" />
              <Mapping SourceColumn="IndexName" DataSetColumn="IndexName" />
              <Mapping SourceColumn="IndexType" DataSetColumn="IndexType" />
              <Mapping SourceColumn="IndexSize" DataSetColumn="IndexSize" />
              <Mapping SourceColumn="Fragmentation" DataSetColumn="Fragmentation" />
              <Mapping SourceColumn="Statistics_LastUpdatedDate" DataSetColumn="Statistics_LastUpdatedDate" />
              <Mapping SourceColumn="IndexSeeks" DataSetColumn="IndexSeeks" />
              <Mapping SourceColumn="IndexScans" DataSetColumn="IndexScans" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="DataSetDatabaseFragmentation" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="DataSetDatabaseFragmentation" msprop:Generator_UserDSName="DataSetDatabaseFragmentation">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Top10PercentIndexesPerDatabase" msprop:Generator_TableClassName="Top10PercentIndexesPerDatabaseDataTable" msprop:Generator_TableVarName="tableTop10PercentIndexesPerDatabase" msprop:Generator_TablePropName="Top10PercentIndexesPerDatabase" msprop:Generator_RowDeletingName="Top10PercentIndexesPerDatabaseRowDeleting" msprop:Generator_UserTableName="Top10PercentIndexesPerDatabase" msprop:Generator_RowChangingName="Top10PercentIndexesPerDatabaseRowChanging" msprop:Generator_RowEvHandlerName="Top10PercentIndexesPerDatabaseRowChangeEventHandler" msprop:Generator_RowDeletedName="Top10PercentIndexesPerDatabaseRowDeleted" msprop:Generator_RowEvArgName="Top10PercentIndexesPerDatabaseRowChangeEvent" msprop:Generator_RowChangedName="Top10PercentIndexesPerDatabaseRowChanged" msprop:Generator_RowClassName="Top10PercentIndexesPerDatabaseRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Server" msprop:Generator_ColumnVarNameInTable="columnServer" msprop:Generator_ColumnPropNameInRow="Server" msprop:Generator_ColumnPropNameInTable="ServerColumn" msprop:Generator_UserColumnName="Server" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="InstanceName" msprop:Generator_ColumnVarNameInTable="columnInstanceName" msprop:Generator_ColumnPropNameInRow="InstanceName" msprop:Generator_ColumnPropNameInTable="InstanceNameColumn" msprop:Generator_UserColumnName="InstanceName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="300" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="DatabaseName" msprop:Generator_ColumnVarNameInTable="columnDatabaseName" msprop:Generator_ColumnPropNameInRow="DatabaseName" msprop:Generator_ColumnPropNameInTable="DatabaseNameColumn" msprop:Generator_UserColumnName="DatabaseName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="300" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="TableName" msprop:Generator_ColumnVarNameInTable="columnTableName" msprop:Generator_ColumnPropNameInRow="TableName" msprop:Generator_ColumnPropNameInTable="TableNameColumn" msprop:Generator_UserColumnName="TableName">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="300" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="IndexName" msprop:Generator_ColumnVarNameInTable="columnIndexName" msprop:Generator_ColumnPropNameInRow="IndexName" msprop:Generator_ColumnPropNameInTable="IndexNameColumn" msprop:Generator_UserColumnName="IndexName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="300" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="IndexType" msprop:Generator_ColumnVarNameInTable="columnIndexType" msprop:Generator_ColumnPropNameInRow="IndexType" msprop:Generator_ColumnPropNameInTable="IndexTypeColumn" msprop:Generator_UserColumnName="IndexType" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="IndexSize" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnIndexSize" msprop:Generator_ColumnPropNameInRow="IndexSize" msprop:Generator_ColumnPropNameInTable="IndexSizeColumn" msprop:Generator_UserColumnName="IndexSize" type="xs:decimal" minOccurs="0" />
              <xs:element name="Fragmentation" msprop:Generator_ColumnVarNameInTable="columnFragmentation" msprop:Generator_ColumnPropNameInRow="Fragmentation" msprop:Generator_ColumnPropNameInTable="FragmentationColumn" msprop:Generator_UserColumnName="Fragmentation" type="xs:decimal" minOccurs="0" />
              <xs:element name="Statistics_LastUpdatedDate" msprop:Generator_ColumnVarNameInTable="columnStatistics_LastUpdatedDate" msprop:Generator_ColumnPropNameInRow="Statistics_LastUpdatedDate" msprop:Generator_ColumnPropNameInTable="Statistics_LastUpdatedDateColumn" msprop:Generator_UserColumnName="Statistics_LastUpdatedDate" type="xs:dateTime" minOccurs="0" />
              <xs:element name="IndexSeeks" msprop:Generator_ColumnVarNameInTable="columnIndexSeeks" msprop:Generator_ColumnPropNameInRow="IndexSeeks" msprop:Generator_ColumnPropNameInTable="IndexSeeksColumn" msprop:Generator_UserColumnName="IndexSeeks" type="xs:long" minOccurs="0" />
              <xs:element name="IndexScans" msprop:Generator_ColumnVarNameInTable="columnIndexScans" msprop:Generator_ColumnPropNameInRow="IndexScans" msprop:Generator_ColumnPropNameInTable="IndexScansColumn" msprop:Generator_UserColumnName="IndexScans" type="xs:long" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
  </xs:element>
</xs:schema>